package cn.demo.service1.controller;

import cn.demo.service1.client.Service0Client;
import cn.demo.service1.filter.UserContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ljh
 * @create 2019/10/11
 * @describe
 */
@RestController
public class TestController {
    @Autowired
    Service0Client service0Client;

    @RequestMapping("/test")
    public String test(){
        String head=UserContextHolder.getContext().getCorrelationId();
        return "service1";
    }
    @RequestMapping("/pro")
    public String pro(){
        String head=UserContextHolder.getContext().getCorrelationId();
        return service0Client.pro();
    }
}
